package org.abacus.platform.client.widget;

import java.util.HashMap;
import java.util.Map;

public abstract class Widget implements Control {
	private Long id;
	private Control parent;
	private Map<String, Object> attributes = new HashMap<String, Object>();

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Control getParent() {
		return parent;
	}

	public void setParent(Control parent) {
		this.parent = parent;
	}

	public Object getAttribute(String key) {
		return attributes.get(key);
	}

	public void setAttribute(String key, Object value) {
		this.attributes.put(key, value);
	}

	public Map<String, Object> getAttributes() {
		return attributes;
	}

	public void setAttributes(Map<String, Object> attributes) {
		this.attributes = attributes;
	}

}
